package mercurius.fitness.client.rb.exercise.forms;

import mercurius.fitness.client.enumtypes.Distance;
import mercurius.fitness.client.enumtypes.YesNo;
import mercurius.fitness.client.rb.exercise.Exercise;
import net.pleso.framework.client.bl.forms.items.IFormItem;
import net.pleso.framework.client.bl.forms.items.IFormItemsGroup;
import net.pleso.framework.client.bl.forms.items.impl.EditFormItem;
import net.pleso.framework.client.bl.forms.items.impl.EnumFormItem;
import net.pleso.framework.client.bl.forms.items.impl.FormItemsGroup;
import net.pleso.framework.client.bl.forms.items.impl.InfoEnumFormItem;
import net.pleso.framework.client.bl.forms.items.impl.MultilineEditFormItem;

public class ExerciseForm {
	
	protected static IFormItemsGroup[] groups;
	
	static {
		
		IFormItem[] items1 = {
				new EditFormItem(Exercise.Columns.title),
				new EditFormItem(Exercise.Columns.location),
				new EditFormItem(Exercise.Columns.distance),
				new EnumFormItem(Exercise.Columns.distance_unit, Distance.getEnum()),
				new EditFormItem(Exercise.Columns.avghr),
				new EditFormItem(Exercise.Columns.maxhr),
				new EditFormItem(Exercise.Columns.avgspeed),
				new EditFormItem(Exercise.Columns.bestspeed),
				new EditFormItem(Exercise.Columns.avgpace),
				new EditFormItem(Exercise.Columns.bestpace),
				new EnumFormItem(Exercise.Columns.speedunit, Distance.getEnum()),
				//new EnumFormItem(Exercise.Columns.pub, YesNo.getEnum())
				new InfoEnumFormItem(Exercise.Columns.pub, YesNo.getEnum())
				};
		
		IFormItem[] items2 = {
				new EditFormItem(Exercise.Columns.date),
				new EditFormItem(Exercise.Columns.duration),
				new EditFormItem(Exercise.Columns.z1),
				new EditFormItem(Exercise.Columns.z2),
				new EditFormItem(Exercise.Columns.z3),
				new EditFormItem(Exercise.Columns.z4),
				new EditFormItem(Exercise.Columns.z5),
				new MultilineEditFormItem(Exercise.Columns.notes, 10),
				new EditFormItem(Exercise.Columns.activity)
				};

		groups = new IFormItemsGroup[] { 
					new FormItemsGroup(null, items1),
					new FormItemsGroup(null, items2)
				};
	}
	 
}
